"""
@Project ：zzzr_api_test 
@File    ：function.py
@IDE     ：PyCharm 
@Author  ：ZSR
@Date    ：2023/2/23 23:24 
"""

import datetime
import random


def random_number(places):
    """随机几位数"""

    a = [str(i) for i in range(1, 10)] * 10000
    b = random.sample(a, places)
    number = ''
    for i in b:
        number = number + i
    return eval(number)


def random_str(places):
    a = [i for i in 'qwertyuioplkjhgfdsazxcvbnm'] * 10000
    b = random.sample(a, places)
    r_str = ''
    for i in b:
        r_str = r_str + i
    return r_str


def random_time():
    time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    return time


if __name__ == '__main__':
    # 6位随机字符设置
    # number=random_number(6)
    # print(number)
    # print(type(number))
    # 88位随机字符设置
    print(random_str(88))
    print(random_time())
